#include <iostream>

using namespace std;

template<typename T>
void swap2(T& x, T& y){
    T t =x;
    x = y;
    y = t;
}
int main(){
	int a = 9;
	int b = 10;
	
	swap2(a, b);
	cout << "a = " << a << " b = " << b << endl;
	
	double x = 1.2;
	double y = 3.2;
	swap2<double>(x, y);
	cout << "x = " << x << " y = " << y << endl;
	
	return 0;
}